package com.zhanglinfeng.api.service.impl;

import com.zhanglinfeng.api.response.ResultResponse;
import com.zhanglinfeng.api.service.TestFeign;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 降级处理类
 */
@Component
public class TestFeignImpl implements TestFeign {

    @Override
    public ResultResponse<List<String>> queryServices() {
        ResultResponse resultResponse = new ResultResponse();
        resultResponse.setCode(500);
        resultResponse.setMessage("发生异常");
        return resultResponse;
    }

    @Override
    public String handleFileUpload(MultipartFile file) {
        return "发生异常";
    }
}
